package com.ycl.service.impl;

import com.github.pagehelper.PageHelper;
import com.ycl.mapper.EbCommentMapper;
import com.ycl.model.EbComment;
import com.ycl.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    private EbCommentMapper ebCommentMapper;

    /**
     * 留言分页实现类
     * @param page
     * @param pageSize
     * @return
     */
    @Override
    public List<EbComment> list(Integer page,Integer pageSize){
        PageHelper.startPage(page,pageSize);
        List<EbComment> ebComments = ebCommentMapper.selectByExample(null);
        return ebComments;
    }
}
